package com.yhd.cloud.controller;

import com.yhd.cloud.service.ProductService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author yinhuidong3@xiaomi.com
 * @since 2021/7/27
 */
@RestController
@RequestMapping("/product")
@Slf4j
public class ProductController {

    @Resource
    private ProductService productService;

    @GetMapping("/skuInfo/{skuId}/{skuNum}")
    public String getSkuInfo(
            @PathVariable("skuId")Integer skuId,
            @PathVariable("skuNum")Integer skuNum
    ){
        return productService.delProductNumById(skuId,skuNum);
    }
}
